import router from "@/router";

let configRouter = [
   {
    path: "/index.html",
    name: "nav-home",
    meta: {
      title: "导航"
    },
    component: () => import("../view/nav-home/nav-home.vue")
  },
  {
    path: "/",
    name: "nav-home",
    meta: {
      title: "导航"
    },
    component: () => import("../view/nav-home/nav-home.vue")
  },
  {
    path: "/nav-search",
    name: "nav-search",
    meta: {
      title: "查询"
    },
    component: () => import("@/view/nav-map/nav-search/nav-search.vue")
  }
];

router.addRoutes(configRouter);

router.beforeEach((to, from, next) => {
  router.customBeforeEach(to, from, next, configRouter);
});

router.afterEach(to => {
  router.customAfterEach(to);
});

export default router;
